const util=require('util');

function Base(){
    this.name='base';
    this.base=1991;
    this.say=function(){
        console.log('hello world');
    };
}
Base.prototype.show=function(){
    console.log(this.name);
};
function Sub(){
    this.name='sub';
}
util.inherits(Sub,Base);

let obj1=new Base();
obj1.show();
obj1.say();
console.log(obj1);
let obj2=new Sub();
obj2.show();
console.log(obj2);
